package com.ywk.base.javaBase.ioStream;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class BufferInputStreamTest {
	public static void main(String[] args) {
		try {
			FileInputStream fis = new FileInputStream("E:\\代码编程。。。。\\Java\\my app\\ew\\mydir1\\mydir2\\myfile.java");
			BufferedInputStream bis = new BufferedInputStream(fis);
			int c = 0;
			System.out.println((char)bis.read());
			System.out.println((char)bis.read());
			bis.mark(33);
			for(int i = 0;i <= 10 && (c = bis.read()) != -1;i++){
				System.out.print((char)c+" ");
			}
			bis.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
